<?php
return array(
	'attributeLabels'=>array(
		'web_id'=>'所属网站',
		'create_time'=>'留言时间',
		'worker_id' => '经销商',
		'memberObj.profile.nickname' => '留言用户'
	),
	
	'cascade' => array(
		'profile',
	),
	
	'rules' => array(
		array('title','length', 'max'=>40),
		array('verify', 'safe'),
		array('verifyCode', 'captcha', 'on'=>'insert', 'allowEmpty'=> !extension_loaded('gd'),'captchaAction'=>'misc/captcha'),
		array('worker_id,uid', 'required'),
	),
	
	'relations' => array(
		'website'=>array(CActiveRecord::BELONGS_TO,'Website','web_id'),
		'profile' => array(ActiveRecord::HAS_ONE, 'WebMessageProfile', 'id'),
	),
	
	'tableName'=>'web_message',
	'behaviors' => array(
		'userScope' => array(
			'class' => 'coms.behaviors.userScopes.DefaultScope',
			'relatedFields' => array(
				'worker_id',
			),
			'autoRun' => false,
		),
		'uidResolver' => array(
			'class' => 'coms.behaviors.AutoIdResolve',
		),
		'webidResolver' => array(
			'class' => 'coms.behaviors.mall.AutoWebIdResolve',
		),
	),		
	'_import' => array(
		array('*', 'models.ContentBase//*'),
	),
);